package com.young.aidl_base_sdk.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author：young
 * .
 * Time： 14/9/2023 上午1:18 周四
 * .
 * Desc：
 */
public class Sample implements Parcelable {

    private int mNum;

    private Sample2 mSample2;

    public int getNum() {
        return mNum;
    }

    public void setNum(int num) {
        mNum = num;
    }

    public Sample2 getSample2() {
        return mSample2;
    }

    public void setSample2(Sample2 sample2) {
        mSample2 = sample2;
    }

    @Override
    public String toString() {
        return "Sample{" +
                "mNum=" + mNum +
                ", mSample2=" + mSample2 +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.mNum);
        dest.writeSerializable(this.mSample2);
    }

    public void readFromParcel(Parcel source) {
        this.mNum = source.readInt();
        this.mSample2 = (Sample2) source.readSerializable();
    }

    public Sample() {
    }

    protected Sample(Parcel in) {
        this.mNum = in.readInt();
        this.mSample2 = (Sample2) in.readSerializable();
    }

    public static final Creator<Sample> CREATOR = new Creator<Sample>() {
        @Override
        public Sample createFromParcel(Parcel source) {
            return new Sample(source);
        }

        @Override
        public Sample[] newArray(int size) {
            return new Sample[size];
        }
    };
}
